home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
video
/
pictetri.src
/
pictetri
/
pictetris-src
/
pieces.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-19
|
2KB
|
84 lines
/***************************************************************************\
|* *|
|* pieces.c: A version of Tetris to run on Linux SVGAlib console. *|
|* This module contains the definitions of the pieces. *|
|* *|
|* Authors: Mike Taylor (mirk@uk.ac.warwick.cs) & *|
|* Arturo Espinosa (arturo@nuclecu.unam.mx) *|
|* Started: Fri May 26 12:26:05 BST 1989 (tetris for terminals) *|
|* Dic 1, 1995 (pictetris) *|
|* *|
\***************************************************************************/
#include "pictetris.h"
#include "pieces.h"
/*-------------------------------------------------------------------------*/
struct piece pieces[NO_PIECES] = {
{ "[]", 4, /* Square piece */
{
{{0,0}, {0,1}, {1,0}, {1,1}},
{{0,0}, {0,1}, {1,0}, {1,1}},
{{0,0}, {0,1}, {1,0}, {1,1}},
{{0,0}, {0,1}, {1,0}, {1,1}}
}
},
{ "<>", 2, /* Long piece */
{
{{0,0}, {1,0}, {2,0}, {3,0}},
{{1,-1}, {1,0}, {1,1}, {1,2}},
{{0,0}, {1,0}, {2,0}, {3,0}},
{{1,-1}, {1,0}, {1,1}, {1,2}}
}
},
{ "()", 3, /* L-shaped piece */
{
{{0,0}, {1,0}, {2,0}, {2,1}},
{{0,1}, {1,-1}, {1,0}, {1,1}},
{{0,-1}, {0,0}, {1,0}, {2,0}},
{{1,-1}, {1,0}, {1,1}, {2,-1}}
}
},
{ "{}", 3, /* Backwards L-shaped piece */
{
{{0,0}, {1,0}, {2,-1}, {2,0}},
{{1,-1}, {1,0}, {1,1}, {2,1}},
{{0,0}, {0,1}, {1,0}, {2,0}},
{{0,-1}, {1,-1}, {1,0}, {1,1}}
}
},
{ "##", 1, /* T-shaped piece */
{
{{1,-1}, {1,0}, {1,1}, {2,0}},
{{0,0}, {1,0}, {1,1}, {2,0}},
{{0,0}, {1,-1}, {1,0}, {1,1}},
{{0,0}, {1,-1}, {1,0}, {2,0}}
}
},
{ "%%", 5, /* S-shaped piece */
{
{{0,0}, {0,1}, {1,-1}, {1,0}},
{{0,-1}, {1,-1}, {1,0}, {2,0}},
{{0,0}, {0,1}, {1,-1}, {1,0}},
{{0,-1}, {1,-1}, {1,0}, {2,0}}
}
},
{ "@@", 5, /* Backwards S-shaped piece */
{
{{0,-1}, {0,0}, {1,0}, {1,1}},
{{0,0}, {1,-1}, {1,0}, {2,-1}},
{{0,-1}, {0,0}, {1,0}, {1,1}},
{{0,0}, {1,-1}, {1,0}, {2,-1}}
}
},
};
/*-------------------------------------------------------------------------*/